<!DOCTYPE HTML>
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<link rel="stylesheet" type="text/css" href="css/index.css">
	
	<script type="text/javascript">
	
	function setData() {
		var data = {
			flag:1,
			data:["头条", "娱乐", "体育", "北京", "财经", "科技", "段子",
			"图片", "汽车", "时尚", "轻松一刻", "军事", "历史", "房产", "游戏", "彩票", "原创", "电台",
			"论坛", "博客", "社会", "电影", "NBA", "中国足球", "国际足球", "CBA", "跑步", "手机",
			"数码", "移动互联", "家居", "旅游", "健康", "读书", "酒香", "教育", "亲子", "葡萄酒",
			"暴雪游戏", "情感", "政务"]
		};
		uexSegmentControl.setData(JSON.stringify(data));
	}

	function show() {
		var obj={
				x:0, 
				y:100, 
				w:380, 
				h:420
			};
		uexSegmentControl.open(JSON.stringify(obj));
	}
	
	function dismiss() {
		uexSegmentControl.close();
	}
	
	function ci() {
		var ci = document.getElementById("ci").value;
		uexSegmentControl.setCurrentItem(ci);
	}
	
	window.uexOnload = function(){
		
		uexSegmentControl.onItemClick = function(position, tabName) {
			alert(position+":"+tabName);
		}
	
	}
	
</script>
</head>

<body>
	<div class="tit">EUExSegmentControl</div>
	<div class="conbor">
		<div class="consj">
			<input type="button" value="open" onclick=show()>
			<input type="button" value="setData" onclick=setData()>
			<input type="button" value="close" onclick=dismiss()>
			<input id="ci" type="text" value="0" maxLength="3">
			<input type="button" value="ci" onclick=ci()>
		</div>
	</div>
</body>
</html>
